home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
programr
/
rsxwdk2s.zip
/
RSXWDK
/
LIBSRC
/
WIN
/
WINCALL.S
< prev
Wrap
Text File
|
1994-12-20
|
2KB
|
118 lines
.text
//
// os_version should the first system_call !!
//
.align 2, 0x90
.globl ___os_version
___os_version:
call _rsxw32_init
/ movb $0x30, %ah
/ call _dos21
movw $0x0050, %ax
ret
//
// EAX = 31-fnct-16 , 0x7E , 7-count-0
// EDX = offset modulname or 1,2,3
// ECX = paramlist
//
// ULONG _wincall(ULONG fnct, ULONG module, ULONG param, char count)
//
.align 2, 0x90
.globl __wincall
__wincall:
pushl %ebp
movl %esp,%ebp
movl 8(%ebp), %eax
movl 12(%ebp), %edx
movl 16(%ebp), %ecx
shll $16, %eax
movb 20(%ebp), %al
movb $0x7E, %ah
pushl %esi
pushl %edi
pushl %ebx
pushl %ebp
call ___syscall
popl %ebp
popl %ebx
popl %edi
popl %esi
leave
ret
//
// call WinProc in EAX ; return to Extender
//
.align 2, 0x90
.globl _wnd_dlg_proc32
_wnd_dlg_proc32:
call %eax
addl $16, %esp
movw __rsxw32_ds, %es
lret
//
// call WinProc in EAX ; return to Extender
//
.align 2, 0x90
.globl _callb32_argc5
_callb32_argc5:
call %eax
addl $5*4, %esp
movw __rsxw32_ds, %es
lret
.align 2, 0x90
.globl _callb32_argc4
_callb32_argc4:
call %eax
addl $4*4, %esp
movw __rsxw32_ds, %es
lret
.align 2, 0x90
.globl _callb32_argc3
_callb32_argc3:
call %eax
addl $3*4, %esp
movw __rsxw32_ds, %es
lret
.align 2, 0x90
.globl _callb32_argc2
_callb32_argc2:
call %eax
addl $2*4, %esp
movw __rsxw32_ds, %es
lret
//
// call interrupts for 32bit program to Windows
//
// problem: windows provides only '286 trapgate'
// high eip, esp not saved!
//
.align 2, 0x90
.globl _dpmi31
_dpmi31:
pushl %ebp
movl %esp, %ebp
// windows kill high eip,esp
movl $0x1000, %esp
movl $0xc3c331cd, __text - 176
call __text - 176
movl %ebp, %esp
pop %ebp
ret